package com.chixing.controller;

//import com.chixing.service.EsUserService;
import com.chixing.service.ICustomerService;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.bind.annotation.RestController;


@RestController
public class EsUserController {
//    @Autowired
//    private EsUserService userService;

    @Autowired
    private ICustomerService customerService;

//    @GetMapping("savecustomer")
//    public String getall(){
//        Result getall = customerService.getall();
//      List<Customer> customers= (List<Customer>) getall.getData();
//        System.out.println(customers);
//        List<EsUser> arrayList = new ArrayList<>();
//
//        for(Customer customer:customers){
//          arrayList.add(  new EsUser(customer.getCustId(),null,customer.getCustName(),null));
//      }
//
//        Iterable<EsUser> s = userService.saveAll(arrayList);
//        System.out.println(s);
//        return "ok"+s;
//    }



}
